<include file="header" />
<body>
<div class="wraper margin-none">
    <div class="top">
        <a href="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
        <span class="pull-left">历史记录</span>
        <a href="{BEESCRM::U('base/ips/index',array('ips_id'=>$ips_id))}" class="iconfont icon-shouye pull-right text-right"></a>
    </div>
	<div class="tab-box clearfix">
		<a href="{BEESCRM::U('base/ips/chargeLog',array('ips_id'=>$ips_id))}" class="tab-list visited">充值记录</a>
		<a href="{BEESCRM::U('base/ips/eleInfo',array('ips_id'=>$ips_id))}" class="tab-list">用电记录</a>
	</div>
	<!--有记录-->
	<empty name="data">
		<!--无记录-->
		<div class="none-list"><img src="/assets/base/cleaning/images/none-list.png"/></div>
	<else />
		<volist name="data" id="vo">
			<div class="lists">
				<p class="text-gray">{BEESCRM:$vo.pay_time|date="Y-m-d H:i:s",###}<span class="pull-right">{BEESCRM:$vo.order_amount}元</span></p>
				<p class="text-12">{BEESCRM:$vo.community_name} {BEESCRM:$vo.building_name} {BEESCRM:$vo.floor_name} {BEESCRM:$vo.room_name}<span class="pull-right on" data-room_id="{BEESCRM:$vo.room_id}" style="color: #008000;">合闸</span></p>
			</div>
		</volist>
		<div class="loadmore">加载中</div>
	</empty>

</div>
<include file="commonJS" />
<script>
	$(function(){
		$('.on').on('click',function(){
			var room_id = $(this).data('room_id');
			$.ajax({
				url:"/base/ips/on/ips_id/3",
				type:"post",
				data:{room_id:room_id},
				dataType:"json",
				success:function(res){
					if(res.status == 'S'){
						$.alert('success',res.message);
					}else{
						$.alert('error',res.message);
					}
				},
				error:function(res){
					$.alert('error','通讯错误');
				}
			})
		});
	});
</script>
</body>
</html>